<?php
require_once PATH_SITE.'cn/royan/php/values/ServerEvent.class.php';
require_once PATH_SITE.'cn/royan/php/utils/builders/Builder.class.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BuilderError
 *
 * @author yanr
 */
class BuilderEvent extends Builder
{
    //put your code here
    const ERROR     = "error";
    const SUCCESS   = "success";
    
    public function __construct( $value )
    {
        $this->config = $value;
    }
    
    public function build() {
        $this->obj = new ServerEvent();
        $this->obj->__set( "event",     $this->config["event"] );
        $this->obj->__set( "code",      $this->config["code"] );
        $this->obj->__set( "target",    $this->config["target"] );
        $this->obj->__set( "data",      $this->config["data"]);
        
        RETURN parent::build();
    }
}

?>
